//
//  ViewController.m
//  链式编程和函数编程
//
//  Created by 383Mac on 2017/9/29.
//  Copyright © 2017年 383Mac. All rights reserved.
//

#import "ViewController.h"
#import "Fouction.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    

    [super viewDidLoad];
    NSLog(@"-------之前传统的调用方式---------");
    
    Fouction *aFouction = [[Fouction alloc]init];
    [aFouction dosomething];
    [aFouction working];
    
    NSLog(@"-----链式调用方式-----------");
    //链式的编程方式
    [[[aFouction dosomething2] working2] dosomething2];

    
    NSLog(@"------函数调用方式----------");
    aFouction.dosomething4(@"工作").working4(@"休息");
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
